<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>SDL_gpu: Debugging, Logging, and Error Handling</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SDL_gpu
   &#160;<span id="projectnumber">0.10.0</span>
   </div>
   <div id="projectbrief">A hardware-accelerated, cross-platform 2D graphics API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">Debugging, Logging, and Error Handling</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structGPU__ErrorObject.html">GPU_ErrorObject</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gac60f40aad8e53d26b877d81ee677fca0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#gac60f40aad8e53d26b877d81ee677fca0">GPU_ErrorEnum</a> { <br />
&#160;&#160;<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0a07798e74ccdfcfaaf83809e986bdc06e">GPU_ERROR_NONE</a> = 0, 
<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0a198168579190a3a5b9795ec4bdec40d9">GPU_ERROR_BACKEND_ERROR</a> = 1, 
<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0afb02e54d9eadace761604c24e4d28765">GPU_ERROR_DATA_ERROR</a> = 2, 
<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0af28aadabca1eaf00f64c98e73bfcccb8">GPU_ERROR_USER_ERROR</a> = 3, 
<br />
&#160;&#160;<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0af532e1bdac8bb0a5353fb97d3bd42ee3">GPU_ERROR_UNSUPPORTED_FUNCTION</a> = 4, 
<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0a0c404bbd3bde6633a82e8b68a63a39a6">GPU_ERROR_NULL_ARGUMENT</a> = 5, 
<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#ggac60f40aad8e53d26b877d81ee677fca0a8b108e3ce5dc4834b2dfec2acf68de2b">GPU_ERROR_FILE_NOT_FOUND</a> = 6
<br />
 }</td></tr>
<tr class="separator:gac60f40aad8e53d26b877d81ee677fca0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fa0c76faebad8544f1d1d74189cdd56"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#ga3fa0c76faebad8544f1d1d74189cdd56">GPU_DebugLevelEnum</a> { <br />
&#160;&#160;<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#gga3fa0c76faebad8544f1d1d74189cdd56aeaa918554a515dda5c409bf5d03152ca">GPU_DEBUG_LEVEL_0</a> = 0, 
<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#gga3fa0c76faebad8544f1d1d74189cdd56a8ef44e75ea8e8256a3b457fdc92498ad">GPU_DEBUG_LEVEL_1</a> = 1, 
<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#gga3fa0c76faebad8544f1d1d74189cdd56a45262857a4dbe07a4cbcdb69daa1641b">GPU_DEBUG_LEVEL_2</a> = 2, 
<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#gga3fa0c76faebad8544f1d1d74189cdd56adf3ae806eb1f9fd81dd1060e6c69abe1">GPU_DEBUG_LEVEL_3</a> = 3, 
<br />
&#160;&#160;<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#gga3fa0c76faebad8544f1d1d74189cdd56ab00c39f6bd55ed3cb5b715e983a4149e">GPU_DEBUG_LEVEL_MAX</a> = 3
<br />
 }</td></tr>
<tr class="separator:ga3fa0c76faebad8544f1d1d74189cdd56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d63627eec7c4152c85ac908e87c4406"><td class="memItemLeft" align="right" valign="top">DECLSPEC void SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga1d63627eec7c4152c85ac908e87c4406.html#ga1d63627eec7c4152c85ac908e87c4406">GPU_SetDebugLevel</a> (<a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#ga3fa0c76faebad8544f1d1d74189cdd56">GPU_DebugLevelEnum</a> level)</td></tr>
<tr class="separator:ga1d63627eec7c4152c85ac908e87c4406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8eeeac36d64c5ac1d2c97d27cff958c"><td class="memItemLeft" align="right" valign="top">DECLSPEC <a class="el" href="group__Logging_ga3fa0c76faebad8544f1d1d74189cdd56.html#ga3fa0c76faebad8544f1d1d74189cdd56">GPU_DebugLevelEnum</a> SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_gae8eeeac36d64c5ac1d2c97d27cff958c.html#gae8eeeac36d64c5ac1d2c97d27cff958c">GPU_GetDebugLevel</a> (void)</td></tr>
<tr class="separator:gae8eeeac36d64c5ac1d2c97d27cff958c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac62c830568ad3d0c6d07618f2c800a5e"><td class="memItemLeft" align="right" valign="top">DECLSPEC void SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_gac62c830568ad3d0c6d07618f2c800a5e.html#gac62c830568ad3d0c6d07618f2c800a5e">GPU_LogInfo</a> (const char *format,...)</td></tr>
<tr class="separator:gac62c830568ad3d0c6d07618f2c800a5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9f8fa942af810a4f25188914e50ae60c"><td class="memItemLeft" align="right" valign="top">DECLSPEC void SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga9f8fa942af810a4f25188914e50ae60c.html#ga9f8fa942af810a4f25188914e50ae60c">GPU_LogWarning</a> (const char *format,...)</td></tr>
<tr class="separator:ga9f8fa942af810a4f25188914e50ae60c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a56d3c6be82de724f5d87b2b99ddf70"><td class="memItemLeft" align="right" valign="top">DECLSPEC void SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga0a56d3c6be82de724f5d87b2b99ddf70.html#ga0a56d3c6be82de724f5d87b2b99ddf70">GPU_LogError</a> (const char *format,...)</td></tr>
<tr class="separator:ga0a56d3c6be82de724f5d87b2b99ddf70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59703b3e1e95593d629c93debd646f36"><td class="memItemLeft" align="right" valign="top">DECLSPEC void SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga59703b3e1e95593d629c93debd646f36.html#ga59703b3e1e95593d629c93debd646f36">GPU_PushErrorCode</a> (const char *function, <a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#gac60f40aad8e53d26b877d81ee677fca0">GPU_ErrorEnum</a> error, const char *details,...)</td></tr>
<tr class="separator:ga59703b3e1e95593d629c93debd646f36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0379a0dca4d3b6de945c60154d0f4a80"><td class="memItemLeft" align="right" valign="top">DECLSPEC <a class="el" href="structGPU__ErrorObject.html">GPU_ErrorObject</a> SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_ga0379a0dca4d3b6de945c60154d0f4a80.html#ga0379a0dca4d3b6de945c60154d0f4a80">GPU_PopErrorCode</a> (void)</td></tr>
<tr class="separator:ga0379a0dca4d3b6de945c60154d0f4a80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac133e5ddfddd6f71d3940ac404e0a037"><td class="memItemLeft" align="right" valign="top">DECLSPEC const char *SDLCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Logging_gac133e5ddfddd6f71d3940ac404e0a037.html#gac133e5ddfddd6f71d3940ac404e0a037">GPU_GetErrorString</a> (<a class="el" href="group__Logging_gac60f40aad8e53d26b877d81ee677fca0.html#gac60f40aad8e53d26b877d81ee677fca0">GPU_ErrorEnum</a> error)</td></tr>
<tr class="separator:gac133e5ddfddd6f71d3940ac404e0a037"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Use <a class="el" href="SDL__gpu_8h_a2374ee5faa8260b881fa4b2513d4331d.html#a2374ee5faa8260b881fa4b2513d4331d">GPU_Log()</a> for normal logging output (e.g. to replace printf). Other logging priorities are handled by <a class="el" href="group__Logging_ga9f8fa942af810a4f25188914e50ae60c.html#ga9f8fa942af810a4f25188914e50ae60c">GPU_LogWarning()</a> and <a class="el" href="group__Logging_ga0a56d3c6be82de724f5d87b2b99ddf70.html#ga0a56d3c6be82de724f5d87b2b99ddf70">GPU_LogError()</a>.</p>
<p>SDL_gpu stores an error stack that you can read and manipulate using <a class="el" href="group__Logging_ga0379a0dca4d3b6de945c60154d0f4a80.html#ga0379a0dca4d3b6de945c60154d0f4a80">GPU_PopErrorCode()</a> and <a class="el" href="group__Logging_ga59703b3e1e95593d629c93debd646f36.html#ga59703b3e1e95593d629c93debd646f36">GPU_PushErrorCode()</a>. If you set the debug level using <a class="el" href="group__Logging_ga1d63627eec7c4152c85ac908e87c4406.html#ga1d63627eec7c4152c85ac908e87c4406">GPU_SetDebugLevel()</a>, you can have any errors automatically logged as they are generated. </p>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Feb 11 2015 20:10:45 for SDL_gpu by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
